MarkLogic Server 11.0 Product Documentation
POST /manage/v2/certificate-templates/{id|name}

Summary

This resource address is used to perform various operations on the specified certificate template.

URL Parameters
format The format of the returned data. Can be either html, json, or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns status code 201 (Created). A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires one of the following:

Usage Notes

The available certificate template operations are summarized in the following list. The details on each operation follow.

Generate Template Certificate Authority

The following operation generates template certificate authority.


    {
      "operation": "generate-template-certificate-authority",
      "valid-for": 3
    }
     

Generate Temporary Certificate

The following operation generates temporary certificate. The valid-for and common-name properties are required. If not specified, if-necessary defaults to true. If if-necessary is true and a temporary certificate already exists for the template, this operation does nothing.


    {
      "operation": "generate-temporary-certificate",
      "valid-for": 3,
      "common-name": "some name",
      "dns-name": "example.com",
      "ip-addr": "localhost",
      "if-necessary": true
    }
     

Get Certificate

The following operation returns a certificate. The common-name property is required.


    {
      "operation": "get-certificate",
      "common-name": "some name",
      "dns-name": "example.com",
      "ip-addr": "localhost"
    }
     

Get Certificates for a Template

The following operation returns the certificates for a template.


    {
      "operation": "get-certificates-for-template"
    }
     

Get Pending Certificate Request

The following operation returns the pending request for a certificate. The common-name property is required.


    {
      "operation": "get-pending-certificate-request",
      "common-name": "some name",
      "dns-name": "example.com",
      "ip-addr": "localhost"
    }
     

Insert Host Certificate

The following operation inserts a host certificate.


    {
      "operation": "insert-host-certificates",
      "certificates": [{
      "certificate": {
      "cert": "-----BEGIN CERTIFICATE-----\nMIIDvzCCAqgg ZZZZZZZZZ\n-----END CERTIFICATE-----",
      "pkey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQ ZZZZZZZZ\n-----END RSA PRIVATE KEY-----"
      }}]
    }
     

Need Certificate?

The following operation determines if a certificate is needed for the template. Returns true if a certificate is needed for the template; false otherwise. The common-name property is required.


    {
      "operation": "need-certificate",
      "common-name": "some name",
      "dns-name": "example.com",
      "ip-addr": "localhost"
    }
     

Generate Certificate Request

The following operation generates a certificate request in the form of a CSR. The common-name property is required.


    {
      "operation": "generate-certificate-request",
      "common-name": "some name",
      "dns-name": "example.com",
      "ip-addr": "localhost"
    }
     

Get Template Certificate Authority

The following operation gets a template certificate authority.


    {
      "operation": "get-template-certificate-authority"
    }
     

Powered by MarkLogic Server | Terms of Use | Privacy Policy